<template>
    <div id="subscriberManage" class="center_div">
        <div class=" leftTreeClass tree_class dataManage18px">
            <div style="height: 100%;">
                <el-tree check-strictly
                         :load="loadChildren"
                         highlight-current
                         lazy
                         node-key="id"
                         :props="defaultProps"
                         :filter-node-method="filterNode"
                         ref="tree"
                         @node-click="loadDataaa">
                <span class="custom-tree-node dataManageBtn24px" slot-scope="{ node, data }">
                   <span v-if="data.type===0"><img src="@/assets/images/mapicon/tree_fleet.png"
                                                   class="treeLableImg">{{ node.label }}</span>
                    <span v-if="data.type===1"><img src="@/assets/images/mapicon/tree_fleet.png"
                                                    class="treeLableImg">{{ node.label }}</span>
                 </span>
                </el-tree>
            </div>
        </div>
        <div style="float:right;width: 80%">
            <div class="searchForm searchFormDataManageBtn22px" style="margin-top: 1%">
                <el-form :inline="true" class="demo-form-inline">
                    <el-form-item label="终端名称">
                        <el-input v-model="subName" ></el-input>
                    </el-form-item>
                    <el-form-item v-if="false" label="登陆账号">
                        <el-input v-model="subNumber" ></el-input>
                    </el-form-item>
                    <el-form-item label="分机号码">
                        <el-input v-model="extNumber" ></el-input>
                    </el-form-item>
                    <el-form-item label="所属部门">
                        <el-select v-model="fleetName" :placeholder="'请选择'"  filterable clearable>
                            <el-option :value="fleetName" style="height: auto">
                                <el-tree
                                        :load="loadChildren"
                                        highlight-current
                                        lazy
                                        node-key="id"
                                        :props="defaultProps"
                                        :filter-node-method="filterNode"
                                        ref="tree"
                                        @node-click="loadData">
                                <span class="custom-tree-node dataManage18px" slot-scope="{ node, data }">
                   <span v-if="data.type===0"><img src="@/assets/images/mapicon/tree_fleet.png"
                                                   class="treeLableImg">{{ node.label }}</span>
                    <span v-if="data.type===1"><img src="@/assets/images/mapicon/tree_fleet.png"
                                                    class="treeLableImg">{{ node.label }}</span>
                 </span>
                                </el-tree>
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="终端类型">
                        <el-select v-model="zdlxsubType" placeholder="请选择"  filterable clearable>
                            <el-option
                                    v-for="item in subTypeOptions"
                                    :key="item.ID"
                                    :label="item.name"
                                    :value="item.ID">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary"  @click="querySearch" class="dataManageBtn22BtnpPx">查询
                        </el-button>
                        <el-button type="primary"  @click="add" class="dataManageBtn22BtnpPx">添加
                        </el-button>
                        <el-button type="primary"  @click="sort" class="dataManageBtn22BtnpPx" v-if="true"
                                   :disabled="tableData.length<2">调整排序
                        </el-button>
                        <el-button type="primary"  @click="batchImport" class="dataManageBtn22BtnpPx"
                                   v-if="true">批量导入
                        </el-button>
                        <el-button type="primary"  @click="batchExport" class="dataManageBtn22BtnpPx">
                            批量导出
                        </el-button>
                        <el-button type="primary"  @click="uploadTemplate" class="dataManageBtn22BtnpPx"
                                   v-if="true">模板下载
                        </el-button>
                    </el-form-item>
                </el-form>
            </div>
            <div class="table-wrap" style="width: 98%;margin-top: -1%">
                <el-table
                        :data="tableData"
                        style="width:100%;text-align: center;"
                        border
                        :header-cell-style="headerCellClassName"
                        cell-class-name="dataManage18px"
                        @selection-change="handleSelectionChange"
                >
                    <el-table-column
                            type="selection"
                            width="80px"
                            align="center">
                    </el-table-column>
                    <el-table-column align="center" v-for="title in tableTitle" :prop="title.prop" :label="title.label"
                                     :show-overflow-tooltip="title.overflowTooltip" :width="title.width">
                    </el-table-column>
                    <el-table-column
                            align="center"
                            prop="zhognduanType"
                            label="终端类型">
                    </el-table-column>
                    <template v-if="buttons && buttons.length!==0">
                        <el-table-column
                                class="align-right"
                                width="250px"
                                align="center"
                                label="操作">
                            <template slot-scope="scope">
                                <el-button v-for="button in buttons"
                                           @click="operate(scope.row,button.href)" :type="button.type"
                                           class="el-button el-button--text el-button--medium dataManageBtn22px">
                                    {{button.label}}
                                </el-button>
                            </template>
                        </el-table-column>
                    </template>
                </el-table>
                <el-pagination
                        class="dataManage18px"
                        layout="total,prev, pager, next"
                        background
                        @current-change="changePageNum"
                        :current-page="pageNum"
                        :page-size="pageSize"
                        :total="total">
                </el-pagination>
            </div>
        </div>
        <el-dialog :title="title" :visible.sync="showSort" width="60%" append-to-body @close="updateIndex">
            <div ref="myChat"></div>
            <el-table
                    :data="subData"
                    style="width:100%;text-align: center;"
                    border
                    class="sortTableClass"
                    header-align="center"
                    cell-class-name="dataManage18px"
                    :header-cell-style="headerCellClassName">
                <el-table-column align="center" v-for="title in sortTableTitle" :prop="title.prop" :label="title.label"
                                 :show-overflow-tooltip="title.overflowTooltip" :width="title.width">
                </el-table-column>
                <template>
                    <el-table-column
                            class="align-right"
                            width="320"
                            header-align="center"
                            label="操作"
                            align="center">
                        <template slot-scope="scope">
                             <span><img src="@/assets/images/mapicon/sortOperate.png"
                                        class="sortmapiconOne"></span>
                            <span><img src="@/assets/images/mapicon/sortUp.png"
                                       class="sortmapicoTwo"
                                       @click="sortUp(scope.row)"></span>
                        </template>
                    </el-table-column>
                </template>
            </el-table>
            <el-pagination
                    v-if="false"
                    class="dataManage18px"
                    layout="total,prev, pager, next"
                    background
                    @current-change="changeSortPageNum"
                    :current-page="sortPage.pageNum"
                    :page-size="sortPage.pageSize"
                    :total="sortlimitData.length">
            </el-pagination>
        </el-dialog>
        <div>
            <el-dialog :title="title" :visible.sync="showBox" width="50%" append-to-body
                       @close="closeDialog">
                <el-form ref="form" :model="form" :rules="rules" label-width="140px" >
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="归属部门" prop="fleetName">
                                <el-select v-model="form.fleetName" :placeholder="'请选择'" filterable
                                           :disabled="showAdd==true?false:true">
                                    <el-option :value="form.fleetName" style="height: auto">
                                        <el-tree
                                                :load="loadChildren"
                                                highlight-current
                                                lazy
                                                node-key="id"
                                                :props="defaultProps"
                                                :filter-node-method="filterNode"
                                                ref="tree"
                                                class="dataManage18px"
                                                @node-click="loadDataa">
                                        <span class="custom-tree-node dataManage18px"
                                              slot-scope="{ node, data }">
                                            <span v-if="data.type===0"><img src="@/assets/images/mapicon/tree_fleet.png"
                                                                            class="treeLableImg">{{ node.label }}</span>
                                            <span v-if="data.type===1"><img src="@/assets/images/mapicon/tree_fleet.png"
                                                                            class="treeLableImg">{{ node.label }}</span>
                                        </span>
                                        </el-tree>
                                    </el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="终端类型" prop="subType">
                                <el-select v-model="form.subType" placeholder="请选择"
                                           :disabled="showAdd==true?false:true">
                                    <el-option
                                            v-for="item in subTypeOptions"
                                            :key="item.ID"
                                            :label="item.name"
                                            :value="item.ID">
                                    </el-option>
                                </el-select>
                            </el-form-item>
                            <!--<el-form-item label="终端型号">-->
                            <!--<el-select v-model="form.mobileType" :disabled="showAdd==true?false:true">-->
                            <!--<el-option-->
                            <!--v-for="item in mobileTypeOptions"-->
                            <!--:key="item.id"-->
                            <!--:label="item.type"-->
                            <!--:value="item.id">-->
                            <!--</el-option>-->
                            <!--</el-select>-->
                            <!--</el-form-item>-->
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="终端名称" prop="name">
                                <el-input v-model="form.name"></el-input>
                            </el-form-item>
                        </el-col>
                        <!--  <el-col :span="12">
                              <el-form-item label="终端号码" prop="number">
                                  &lt;!&ndash;onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"&ndash;&gt;
                                  <el-input v-model="form.number" type="number" :min="0"
                                  ></el-input>
                              </el-form-item>
                          </el-col>-->
                        <el-col :span="12">
                            <el-form-item label="IP分机号码" prop="extNumber">
                                <el-input v-model="form.extNumber" type="number" :min="0"
                                          onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="终端密码" prop="password">
                                <el-input v-model="form.password" type="password"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="通讯录管理层级" prop="abfleetName">
                                <el-select v-model="form.abfleetName" :placeholder="'请选择'" filterable
                                >
                                    <el-option :value="form.abfleetId" style="height: auto">
                                        <el-tree
                                                :load="loadChildren"
                                                highlight-current
                                                lazy
                                                node-key="id"
                                                :props="defaultProps"
                                                :filter-node-method="filterNode"
                                                ref="tree"
                                                class="dataManage18px"
                                                @node-click="clickabfleetId">
                                        <span class="custom-tree-node dataManage18px"
                                              slot-scope="{ node, data }">
                                            <span v-if="data.type===0"><img src="@/assets/images/mapicon/tree_fleet.png"
                                                                            class="treeLableImg">{{ node.label }}</span>
                                            <span v-if="data.type===1"><img src="@/assets/images/mapicon/tree_fleet.png"
                                                                            class="treeLableImg">{{ node.label }}</span>
                                        </span>
                                        </el-tree>
                                    </el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>

                    </el-row>
                </el-form>
                <div slot="footer" class="dialog-footer">
                    <el-button @click="closeBox"  class="dataManageBtn22BtnpPx">取消</el-button>
                    <el-button class="dataManageBtn22BtnpPx" type="primary"  @click="addSubscriber('form')"
                               v-show="showAdd">添加
                    </el-button>
                    <el-button class="dataManageBtn22BtnpPx" type="primary"
                               @click="updateSubscriber('form')" v-show="!showAdd">修改
                    </el-button>
                </div>
            </el-dialog>
        </div>

        <el-dialog :title="title" :visible.sync="showImportBox" width="50%" append-to-body>
            <el-form :model="form" ref="ruleform" :rules="inpotrules" label-width="120px" >
                <el-row>
                    <el-col :span="12">
                        <el-form-item label="归属部门" prop="fleetName">
                            <el-select v-model="form.fleetName" :placeholder="'请选择'" filterable
                                       :disabled="showAdd==true?false:true">
                                <el-option :value="form.fleetName" style="height: auto">
                                    <el-tree
                                            :load="loadChildren"
                                            highlight-current
                                            lazy
                                            node-key="id"
                                            :props="defaultProps"
                                            :filter-node-method="filterNode"
                                            ref="tree"
                                            @node-click="loadDataa">
                                          <span class="custom-tree-node dataManage18px"
                                                slot-scope="{ node, data }">
                                            <span v-if="data.type===0"><img src="@/assets/images/mapicon/tree_fleet.png"
                                                                            class="treeLableImg">{{ node.label }}</span>
                                            <span v-if="data.type===1"><img src="@/assets/images/mapicon/tree_fleet.png"
                                                                            class="treeLableImg">{{ node.label }}</span>
                                        </span>
                                    </el-tree>
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="终端类型" prop="subType">
                            <el-select v-model="form.subType" placeholder="请选择" :disabled="showAdd==true?false:true">
                                <el-option
                                        v-for="item in subTypeOptions"
                                        :key="item.ID"
                                        :label="item.name"
                                        :value="item.ID">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="12">
                        <el-form-item label="导入文件" :required="true">
                            <el-input placeholder="+选择文件" v-model="fileName" @click.native="selectFile"></el-input>
                            <input id="selectFile" type="file" style="display: none">
                        </el-form-item>
                    </el-col>

                </el-row>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button @click="closeBox"  class="dataManageBtn22BtnpPx">取消</el-button>
                <el-button type="primary"  @click="importSubscriber" v-show="showAdd"
                           class="dataManageBtn22BtnpPx">添加
                </el-button>
            </div>
        </el-dialog>
        <!----------------------管理设备负责人------------------>
        <el-dialog title="设备负责人管理" :visible.sync="guarderManage.seen" append-to-body>
            <div style="height: 400px">

                <div style="float:left;width:60%;height:90%">
                    <div>
                        <div class="split-line">请选择负责人</div>
                    </div>
                    <div style="height:99%;width:99%;margin-top:1%;background:white;overflow:auto">
                        <el-tree check-strictly
                                 :load="loadGuarderChildren"
                                 show-checkbox
                                 highlight-current
                                 lazy
                                 node-key="id"
                                 :props="guarderManage.defaultProps"
                                 :filter-node-method="filterGuarderNode"
                                 ref="tree"
                                 @check-change="handleGuarderCheckChange">
                        <span class="custom-tree-node" style="font-size: 14px" slot-scope="{ node, data }">
                            <span v-if="data.type===0"><img src="@/assets/images/mapicon/tree_fleet.png"
                                                            class="treeLableImg">{{ node.label }}</span>
                            <span v-if="data.type===1"><img src="@/assets/images/mapicon/tree_fleet.png"
                                                            class="treeLableImg">{{ node.label }}</span>
                           <span v-if="data.type===2"><img src="@/assets/images/mapicon/tree_sub.png"
                                                           class="treeLableImg">{{ node.label }}</span>
                        </span>
                        </el-tree>
                    </div>
                </div>

                <div style="float:right;width:40%;height:90%;background: ghostwhite;overflow: auto">
                    <div>
                        <div class="split-line">已选择负责人</div>
                    </div>
                    <el-row v-for="item in guarderManage.chooseData" :key="item.id" style="padding: 3px">
                        <el-col :span="16" style="padding-top: 5px;font-size: 13px">
                                <span style="text-overflow:ellipsis">
                                   {{item.name}}
                                </span>
                        </el-col>
                        <el-col :span="5">
                            <el-button @click="deleteGuarderMember(item.id)"
                                       class="el-button el-button--text el-button--medium">删除
                            </el-button>
                        </el-col>
                    </el-row>
                </div>

            </div>
            <div slot="footer" class="dialog-footer">
                <el-button  @click="guarderManage.seen = false" class="dataManageBtn22BtnpPx">取 消
                </el-button>
                <el-button  type="primary" @click="guarderModify" class="dataManageBtn22BtnpPx">确 定
                </el-button>
            </div>
        </el-dialog>
    </div>
</template>
<script>
  import SubscriberManage from '@/api/dataManages/SubscriberManage';
  import {Md5_Encrpt} from '@/utils/Emd5.js';
  // import Sortable from '@/plugins/Sortable.js';
  import Sortable from 'sortablejs';

  export default {
    name: 'SubscriberManage',
    props: {
      FleetId: Number,
      userId: Number,
    },
    data() {
      return {
        checkGroup: '',
        defaultProps: {
          label: 'name',
          isLeaf: 'isLeaf',
        },
        subName: '',
        subNumber: '',
        extNumber: '',
        zdlxsubType: '',
        rules: {
          fleetName: [
            {required: true, message: '请选择部门', trigger: 'change'},
          ], subType: [
            {required: true, message: '请选择终端类型', trigger: 'change'},
          ],
          name: [
            {required: true, message: '请输入终端名称', trigger: 'blur'},
            {min: 1, max: 30, message: '长度在 1 到 30 个字符', trigger: 'blur'},
          ],
          number: [
            {required: true, message: '请输入终端号码', trigger: 'blur'},
          ], password: [
            {required: true, message: '请输入终端密码', trigger: 'blur'},
            {min: 1, max: 90, message: '长度在 1 到 90 个字符', trigger: 'blur'},
          ],
          extNumber: [
            {required: true, message: '请输入IP分机号码', trigger: 'blur'},
            {min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur'},
          ],
          remark: [
            {required: false, message: '请选择部门', trigger: 'blur'},
            {min: 1, max: 128, message: '长度不能超过128个字符', trigger: 'blur'},
          ],
          abfleetName: [
            {required: true, message: '请选择通讯录管理层级', trigger: 'change'},
          ],
        },
        inpotrules: {
          fleetName: [
            {required: true, message: '请选择归属部门', trigger: 'change'},
          ], subType: [
            {required: true, message: '请选择终端类型', trigger: 'change'},
          ],
          fileName: [
            {required: true, message: '请选择选择文件', trigger: 'change'},
          ],

        },
        fleetName: '',
        searchData: {},
        tableTitle: [
          {label: '设备名称', prop: 'NAME', overflowTooltip: true},
          // {label: '设备号码', prop: 'NUMBER',overflowTooltip:true},
          {label: '分机号码', prop: 'EXTNUMBER', overflowTooltip: true},
          {label: '所属部门', prop: 'fleetName', overflowTooltip: true},
          {label: '创建时间', prop: 'CREATEDATETIME', width: '300'},
        ],
        tableData: [],
        total: 0,
        pageNum: 1,
        pageSize: 8,
        sortPage: {
          total: 0,
          pageNum: 1,
          pageSize: 8,
        },
        buttons: [{label: '编辑', href: 'update'}, {label: '删除', href: 'delete'}],
        // buttons: [{label: '编辑', href: 'update'}, {label: '删除', href: 'delete'}, {label: '设备负责人', href: 'guarder'}],
        multipleSelection: [],
        showBox: false,
        showAdd: true,
        showSort: false,
        drawBodyWrapper: '',
        drawheaderWrapper: '',
        showImportBox: false,
        title: '',
        form: {
          subId: '',
          fleetName: '',
          fleetId: '',
          subType: '',
          mobileType: '',
          extNumber: '',
          name: '',
          number: '',
          password: '',
          isNeedLoc: 1,
          reportMode: 1,
          reportType: 2,
          circle: '',
          abfleetName: '',
          abfleetId: '',
        },
        subTypeOptions: [],
        mobileTypeOptions: [],
        extNumberOptions: [],
        checkedCap: [],
        Capabilities: [
          {label: '对讲', value: 0}, {label: '定位', value: 1}, {label: '视频', value: 2}, {
            label: '短消息',
            value: 3,
          }, {label: 'IP语音', value: 4}, {label: 'IP视频', value: 5}],
        checkedPri: [],
        Privilege: [
          {label: '退出App', value: 0}, {label: '监听群组', value: 1}, {
            label: '视频',
            value: 2,
          }, {label: '定位', value: 3}],
        isNeedLocOptions: [{label: '关', value: 0}, {label: '开', value: 1}],
        reportModeOptions: [{label: '签到上报', value: 0}, {label: '开机上报', value: 1}],
        reportTypeOptions: [
          {label: '设备模式(gps)', value: 0}, {
            label: '高精度模式（GPS+网络+Wifi）',
            value: 1,
          }, {label: '低功耗模式（网络+Wifi）', value: 1}],
        checkFleet: '',
        checkMonitor: '',
        oldPassword: '',
        guarderManage: {

          seen: false,

          defaultProps: {
            label: 'name',
            isLeaf: 'isLeaf',
          },
          chooseData: [],
          subId: '',
        },
        sortTableTitle: [
          {label: '终端名称', prop: 'NAME', overflowTooltip: true},
          {label: '终端号码', prop: 'NUMBER', overflowTooltip: true},
          {label: '分机号码', prop: 'EXTNUMBER', overflowTooltip: true},
          {label: '创建时间', prop: 'CREATEDATETIME', overflowTooltip: true, width: 300},
          {label: '所属部门', prop: 'fleetName', overflowTooltip: true},
        ],
        subData: [],
        fileName: '',
      };
    },
    created() {
      this.changeDmgPage();
    },
    mounted() {
      this.query(1);
      this.getExtNumber();
      this.getMobileType();
      this.AddgetSubType();
      this.$nextTick(function() {
        $('.el-checkbox__inner').css('display', 'block');
      });
    },
    computed: {
      extNumberA() {
        return this.form.extNumber;
      },
      sortlimitData() {
        // let data = [...this.groupData];
        return this.subData;
      },
      dataWithSortPage() {
        const data = this.sortlimitData;
        const start = this.sortPage.pageNum * this.sortPage.pageSize - this.sortPage.pageSize;
        const end = start + this.sortPage.pageSize;
        return [...data].slice(start, end);
      },
    },
    watch: {
      /*处理删除页面最后一条数据时，currentPage没有减一，页面列表为空*/
      total() {
        if (this.total == (this.pageNum - 1) * this.pageSize && this.total != 0) {
          this.pageNum -= 1;
          query(1);//获取列表数据
        }
      },
      extNumberA(val) {
        if (val.length > 10) {
          this.$message.error('分机号不能超过10位数字');
          this.form.extNumber.substring(0, 10);
        }
      },
    },
    methods: {
      querySearch() {
        this.query(1);
        this.pageNum = 1;
      },
      changeDmgPage() {
        let w = window.screen.width;
        let h = window.screen.height;
        if (w == 1920) {
          if (h == 1080) {
          } else {
            this.pageSize = 11;
          }
        }
      },
      //表头样式
      headerCellClassName() {
        return 'font-size:18px;color:#515A6E;padding:10px 0px 10px 0px !important;background:#F5F5F6;border:1px solid #EBEBEB';
      },
      //表格样式
      cellStyleClassName() {
        return 'font-size:13px;text-align:center;color:#606266;padding:5px 0px 5px 0px !important;border:1px solid #EBEBEB';
      },
      updateIndex() {
        SubscriberManage.updateSubscriberIndex({
          subData: this.subData,
        }).then(res => {
          if (res.success) {
            this.query(1);
          } else {
            this.$message(res.msg);
          }
        }).catch(err => {
          // 异常情况
          console.log(err);
        });
      },
      sortUp(row) {
        console.log(row.index);
        for (var i = 0; i < this.subData.length; i++) {
          if (this.subData[i].index == row.index) {
            this.subData.splice(i, 1);
          }
        }
        // this.subData.splice(row.index,1);
        this.subData.unshift(row);
      },
      sort() {
        var data = {
          // fleetId: this.FleetId,
          fleetId: this.searchData.fleetId || this.FleetId,
          pageNum: 1,
          pageSize: 100000,
        };
        this.subData = [];
        /*setTimeout(()=>{
          this.subData = this.tableData;
        },100)*/
        SubscriberManage.getFleetSub(data).then(res => {
          // 返回数据

          if (res.success) {

            for (var i = 0; i < res.obj.list.length; i++) {
              res.obj.list[i].CREATEDATETIME = this.GlobalFunc.timeFormatRow(res.obj.list[i].CREATEDATETIME);
            }
            let stateAllSubTypeDatas = this.$store.getters.stateAllSubType;
            for (let t = 0; t < stateAllSubTypeDatas.length; t++) {
              for (var i = 0; i < res.obj.list.length; i++) {
                if (stateAllSubTypeDatas[t].ID == res.obj.list[i].SUBTYPE_ID) {
                  res.obj.list[i]['zhognduanType'] = stateAllSubTypeDatas[t].name;
                }
              }
            }
            console.log(res);
            this.subData = res.obj.list;
          } else {
            this.$message('查询失败');
          }
        }).catch(err => {
          // 异常情况
          console.log(err);
        });
        this.title = '调整排序';
        this.showSort = true;
        this.$nextTick(() => {
          let id = this.$refs.myChat;
          let tableColumn = this.$refs.tableColumn;
          const drawBodyWrapper = document.querySelector('.el-dialog__body tbody');
          const drawheaderWrapper = document.querySelector('.el-table__header-wrapper tr');
          this.drawBodyWrapper = drawBodyWrapper;
          this.drawheaderWrapper = drawheaderWrapper;
          this.rowDrop2();
        });
      },
      //行拖拽
      rowDrop() {
        const tbody = this.drawBodyWrapper;
        const _this = this;
        Sortable.create(tbody, {
          onEnd({newIndex, oldIndex}) {
            const currRow = _this.subData.splice(oldIndex, 1)[0];
            _this.subData.splice(newIndex, 0, currRow);
          },
        });
      },
      rowDropTable() {
        setTimeout(() => {
          var el = this.drawBodyWrapper;
          this.sortable = Sortable.create(el, {
            onEnd: (evt) => {
              let itemEl = evt.item;
              let oldIndex = evt.oldIndex;
              let newIndex = evt.newIndex;
              let temp = this.tableData[oldIndex];
              if (oldIndex < newIndex) {
                for (var i = oldIndex; i < newIndex; i++) {
                  this.tableData[i] = this.tableData[i + 1];
                }
              } else if (oldIndex > newIndex) {
                for (var i = oldIndex; i > newIndex; i--) {
                  this.tableData[i] = this.tableData[i - 1];
                }
              }
              this.tableData[newIndex] = temp;
            },
          });
        }, 100);
      },
      rowDrop2() {
        setTimeout(() => {
          var el = this.drawBodyWrapper;
          this.sortable = Sortable.create(el, {
            onEnd: (evt) => {
              let itemEl = evt.item;
              let oldIndex = evt.oldIndex;
              let newIndex = evt.newIndex;
              let temp = this.subData[oldIndex];
              if (oldIndex < newIndex) {
                for (var i = oldIndex; i < newIndex; i++) {
                  this.subData[i] = this.subData[i + 1];
                }
              } else if (oldIndex > newIndex) {
                for (var i = oldIndex; i > newIndex; i--) {
                  this.subData[i] = this.subData[i - 1];
                }
              }
              this.subData[newIndex] = temp;
            },
          });
        }, 100);
      },
      loadDataaa: function(node) {
        console.log(node);
        var data = {
          fleetId: node.id,
          pageNum: 1,
          pageSize: this.pageSize,
        };
        this.searchData.fleetName = node.name;
        this.searchData.fleetId = node.id;
        SubscriberManage.getFleetSub(data).then(res => {
          // 返回数据
          var data = res;
          for (var i = 0; i < data.obj.list.length; i++) {
            data.obj.list[i].CREATEDATETIME = this.GlobalFunc.timeFormatRow(data.obj.list[i].CREATEDATETIME);
          }
          if (res.success) {
            let stateAllSubTypeDatas = this.$store.getters.stateAllSubType;
            for (let t = 0; t < stateAllSubTypeDatas.length; t++) {
              for (var i = 0; i < res.obj.list.length; i++) {
                if (stateAllSubTypeDatas[t].ID == res.obj.list[i].SUBTYPE_ID) {
                  res.obj.list[i]['zhognduanType'] = stateAllSubTypeDatas[t].name;
                }
              }
            }
            this.tableData = data.obj.list;
            this.total = data.obj.total;
            this.$nextTick(function() {
              $('.el-checkbox__inner').css('display', 'block');
            });
          } else {
            this.$message('查询失败');
          }
        }).catch(err => {
          this.userName = '';
          // 异常情况
          console.log(err);
        });
      },
      refreshNodeBy: function() {
        var node = this.$refs.tree.getNode(this.FleetId);
        node.loaded = false;
        node.expand();
      },
      checkNumber() {
        var number = this.form.number;
        number = number.replace(/[^\d]/g, '');
        if ((number.indexOf('.') < 0 && number != '') || (number.indexOf('e')) && number != '') {
          number = parseInt(number);
        }
        this.$nextTick(function() {
          this.form.number = number;
        });
      },
      handleCheckedCapChange: function(value) {
        var checkedCount = value.length;
      },
      checkMange: function() {
        if (this.checkAllGroup) {
          this.checkSomeGroup = false;
        }
        if (this.checkSomeGroup) {
          this.checkAllGroup = false;
        }
        if (this.checkAllFleet) {
          this.checkSomeFleet = false;
        }
        if (this.checkSomeFleet) {
          this.checkAllFleet = false;
        }
        if (this.checkAllMonitor) {
          this.checkSomeMonitor = false;
        }
        if (this.checkSomeMonitor) {
          this.checkAllMonitor = false;
        }
      },
      loadChildren(node, resolve) {
        if (node.data) {
          this.getChild(node.data.id, node.data.type, resolve);
        } else {
          setTimeout(() => {
            this.getChild(this.FleetId, 0, resolve);
          }, 0);
        }
      },
      getChild: function(id, type, resolve) {
        var jsonData = {
          parentId: id,
          type: type,
        };
        SubscriberManage.getFleet(jsonData).then(res => {
          res = res;
          if (res.success) {
            var childNodes = [];
            if (res.obj) {
              childNodes = res.obj;
            }
            resolve(childNodes);
          }
        }).catch(err => {
          // 异常情况
        });
      },
      filterNode: function(value, data) {
        if (!value)
          return true;
        else
          return data.name.indexOf(value) !== -1;
      },
      loadData: function(node) {
        this.fleetName = node.name;
        this.searchData.fleetName = node.name;
        this.searchData.fleetId = node.id;
        // $('.el-select-dropdown').hide()
      },
      loadDataa: function(node) {
        this.form.fleetName = node.name;
        this.form.fleetId = node.id;
        this.getSubType(node.id);
      },
      //通讯录管理层级
      clickabfleetId: function(node) {
        this.form.abfleetName = node.name;
        this.form.abfleetId = node.id;
        this.getSubType(node.id);
      },
      timeFormat(time) {
        var date, Y, M, D, h, m, s;
        date = new Date(time);
        Y = date.getFullYear() + '年';
        M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '月';
        D = (date.getDate() < 10 ? ('0' + date.getDate()) : date.getDate()) + '日 ';
        h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + '时';
        m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + '分';
        s = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()) + '秒';
        ;
        return Y + M + D + h + m + s;
      },
      query: function(pageNum) {
        console.log(this.zdlxsubType);
        var data = {
          fleetId: this.$data.searchData.fleetId || '',
          pageNum: pageNum || this.pageNum,
          pageSize: this.pageSize,
          subName: this.subName || '',
          subNumber: this.subNumber || '',
          extNumber: this.extNumber || '',
          SUBTYPE_ID: this.zdlxsubType || '',//终端类型id
        };
        if (data.fleetId === '') {
          data.fleetId = this.FleetId;
        }
        SubscriberManage.getFleetSub(data).then(res => {
          if (res.success) {
            for (var i = 0; i < res.obj.list.length; i++) {
              res.obj.list[i].CREATEDATETIME = this.GlobalFunc.timeFormatRow(res.obj.list[i].CREATEDATETIME);
            }
            let stateAllSubTypeDatas = this.$store.getters.stateAllSubType;
            for (let t = 0; t < stateAllSubTypeDatas.length; t++) {
              for (var i = 0; i < res.obj.list.length; i++) {
                if (stateAllSubTypeDatas[t].ID == res.obj.list[i].SUBTYPE_ID) {
                  res.obj.list[i]['zhognduanType'] = stateAllSubTypeDatas[t].name;
                }
              }
            }

            this.tableData = res.obj.list;
            console.log(this.tableData);
            // this.total = res.obj.total / 1.5;
            this.total = res.obj.total;
            this.$nextTick(function() {
              $('.el-checkbox__inner').css('display', 'block');
            });
          } else {
            this.$message('查询失败');
          }
        }).catch(err => {
          // 异常情况
        });

      },
      getExtNumber: function() {
        SubscriberManage.getExtNumber({type: 1}).then(res => {
          var data = res;
          if (res.success) {
            this.extNumberOptions = data.obj.list;
          } else {
            this.$message(res.msg);
          }
        }).catch(err => {
          // 异常情况
        });
      },
      getSubType: function(id) {
        SubscriberManage.getSubType({fleetId: id}).then(res => {
          var data = res;
          if (res.success) {
            this.subTypeOptions = data.obj.list;
          } else {
            this.$message(res.msg);
          }
        }).catch(err => {
          // 异常情况
        });
      },
      AddgetSubType() {
        SubscriberManage.getSubType({
          fleetId: this.FleetId,
        }).then(res => {
          var data = res;
          if (res.success) {
            this.subTypeOptions = data.obj.list;
          } else {
            this.$message(res.msg);
          }
        }).catch(err => {
          // 异常情况
        });
      },
      getMobileType: function() {
        SubscriberManage.getMobileType({}).then(res => {
          var data = res;
          if (res.success) {
            this.mobileTypeOptions = data.obj.list;
          } else {
            this.$message(res.msg);
          }
        }).catch(err => {
          // 异常情况
        });
      },
      formClear: function() {
        this.form.subId = '';
        this.form.fleetId = '';
        this.form.fleetName = '';
        this.form.subType = '';
        this.form.mobileType = '';
        this.form.extNumber = '';
        this.form.name = '';
        this.form.number = '';
        this.form.password = '';
      },
      add(formName) {
        this.formClear();
        this.AddgetSubType();
        this.showBox = true;
        this.showAdd = true;
        this.title = '添加终端';
        this.getExtNumber();
      },
      closeDialog() {
        this.$nextTick(() => {
          this.$refs['form'].resetFields();
        });
      },
      addSubscriber(formName) {
        let validate = false;
        this.$refs['form'].validate((valid) => {
          if (valid) {
            validate = true;
          } else {
            validate = false;
            return false;
          }
        });
        if (validate === false) {
          return;
        }
        var that = this;
        var data = {
          fleetId: that.form.fleetId,
          subType: that.form.subType,
          mobileType: that.form.mobileType,
          extNumber: that.form.extNumber,
          name: that.form.name,
          number: that.form.extNumber,
          abfleetId: that.form.abfleetId,
          password: Md5_Encrpt(that.form.password),
          // password: that.form.password,
          versionType: 1,
        };
        if (that.form.fleetId === '') {
          this.$message('归属部门不能为空');
          return;
        }
        if (that.form.subType === '') {
          this.$message('终端类型不能为空');
          return;
        }
        if (data.extNumber.length > 20) {
          this.$message.error('IP分机号码长度不能超过20个字符！');
          return;
        }
        var auditData = {
          dcId: this.$store.getters.userAccount,
          type: 5,
          status: '成功',
          describe: this.$store.getters.userName + '添加终端:' + data.name,
          time: new Date,
          fleetId: this.$store.getters.scsFleetId,
          detailType: 26,
          remark: '',
        };

        SubscriberManage.addSubscriber(data).then(res => {
          if (res.success) {
            let row = res.obj.count;
            if (row) {
              switch (row) {
                case 1 ://添加修改成功
                  this.GlobalFunc.GlaAddAudit(auditData);
                  this.closeBox();
                  this.$message.success('添加成功');
                  this.query(this.pageNum);
                  break;
                case 2 ://分机号已被使用
                  auditData.status = '失败:分机号已被使用';
                  this.GlobalFunc.GlaAddAudit(auditData);

                  this.$message.success('分机号已被使用');
                  break;
                case 3 ://分机号类型错误
                  auditData.status = '失败:分机号类型错误';
                  this.GlobalFunc.GlaAddAudit(auditData);
                  this.$message.error('分机号类型错误');
                  break;
                case 4 ://非分机号
                  auditData.status = '失败:终端名称或者终端号码重复';
                  this.$message.success('终端名称或者终端号码重复');
                  break;
                default:
                  auditData.status = '失败';
                  this.GlobalFunc.GlaAddAudit(auditData);
                  break;
              }
            }
          } else {
            auditData.status = '失败';
            this.GlobalFunc.GlaAddAudit(auditData);
            this.$message(res.msg);
          }
        }).catch(err => {
          // 异常情况
          auditData.status = '异常';
          this.GlobalFunc.GlaAddAudit(auditData);
        });
      },
      updateSubscriber() {
        let validate = false;
        this.$refs['form'].validate((valid) => {
          if (valid) {
            validate = true;
          } else {
            validate = false;
            return false;
          }
        });
        if (validate === false) {
          return;
        }
        var data = {
          subId: this.form.subId,
          fleetId: this.form.fleetId,
          subType: this.form.subType,
          mobileType: this.form.mobileType,
          extNumber: this.form.extNumber,
          name: this.form.name,
          number: this.form.extNumber,
          versionType: 1,
          abfleetId: this.form.abfleetId,
        };
        if (data.extNumber.length > 20) {
          this.$message.error('IP分机号码长度不能超过20个字符！');
          return;
        }
        if (this.form.password === this.oldPassword) {
          data.password = this.form.password;
        } else {
          data.password = Md5_Encrpt(this.form.password);
        }
        var auditData = {
          dcId: this.$store.getters.userAccount,
          type: 5,
          status: '成功',
          describe: this.$store.getters.userName + '修改终端:' + data.name,
          time: new Date,
          fleetId: this.$store.getters.scsFleetId,
          detailType: 26,
          remark: '',
        };
        SubscriberManage.updateSubscriber(data).then(res => {
          if (res.success) {
            let row = res.obj.count;
            if (row) {
              switch (row) {
                case 1 ://添加修改成功
                  this.closeBox();
                  this.GlobalFunc.GlaAddAudit(auditData);

                  this.$message.success('修改成功');
                  this.query(this.pageNum);
                  break;
                case 2 ://分机号已被使用
                  auditData.status = '失败:分机号已被使用';
                  this.GlobalFunc.GlaAddAudit(auditData);
                  this.$message.success('分机号已被使用');
                  break;
                case 3 ://分机号类型错误
                  auditData.status = '失败:分机号类型错误';
                  this.GlobalFunc.GlaAddAudit(auditData);
                  this.$message.error('分机号类型错误');
                  break;
                case 4 ://非分机号
                  auditData.status = '失败:终端名称或者终端号码重复';
                  this.$message.success('终端名称或者终端号码重复');
                  break;
              }

            } else {
              auditData.status = '失败';
              this.GlobalFunc.GlaAddAudit(auditData);
              this.$message(res.msg);
            }

          } else {
            auditData.status = '失败';
            this.GlobalFunc.GlaAddAudit(auditData);
          }
        }).catch(err => {
          // 异常情况

          auditData.status = '异常';
          this.GlobalFunc.GlaAddAudit(auditData);
        });
      },
      operate: function(row, href) {
        var that = this;
        that.formClear();
        if (href.indexOf('update') !== -1) {
          that.getExtNumber();
          that.showBox = true;
          that.showAdd = false;
          that.title = '编辑终端';
          that.form.subId = row.subscriber_id;
          that.form.fleetId = row.FLEET_ID;
          that.getSubType(row.FLEET_ID);
          that.form.fleetName = row.fleetName;
          that.form.subType = row.SUBTYPE_ID;
          that.form.mobileType = row.mobileTypeId;
          that.form.extNumber = row.EXTNUMBER;
          that.form.name = row.NAME;
          that.form.number = row.NUMBER;
          that.form.abfleetId = row.abfleetId;
          that.form.abfleetName = row.abFleetName;
          that.form.password = row.User_login_password;
          that.oldPassword = row.User_login_password;
        } else if (href.indexOf('delete') !== -1) {

          this.$confirm('是否确定删除', '', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning',
          }).then(() => {
            var auditData = {
              dcId: this.$store.getters.userAccount,
              type: 5,
              status: '成功',
              describe: this.$store.getters.userName + '删除终端:' + row.NAME,
              time: new Date,
              fleetId: this.$store.getters.scsFleetId,
              detailType: 26,
              remark: '',
            };
            SubscriberManage.deleteSubscriber({subId: row.subscriber_id, extNumber: row.EXTNUMBER}).then(res => {
              var res = res;
              if (res.success) {
                that.$message.success('删除成功');
                that.query(that.pageNum);
              } else {
                that.$message.success('删除失败');
                auditData.status = '失败';
                this.GlobalFunc.GlaAddAudit(auditData);
              }
            }).catch(err => {
              // 异常情况
            });
          }).catch(() => {
          });

        } else if (href.indexOf('guarder') !== -1) {
          this.guarderManage.subId = row.subscriber_id;
          this.queryGuarder(row.subscriber_id);

        }
      },
      queryGuarder: function(subId) {
        console.info('queryGuarder');
        var jsonData = {
          subId: subId,
        };
        /* axios.post('/scs/subscriberManage/queryGuarder', jsonData)
         .then(function (res) {
           res = res.data;
           if (res.success) {
             window.subscriberManageVue.guarderManage.chooseData = res.obj;
             window.subscriberManageVue.guarderManage.seen = true;
           }
         })
         .catch(function (error) {
           console.log(error);
         });*/
        SubscriberManage.queryGuarder(jsonData).then(res => {
          if (res.success) {
            this.guarderManage.chooseData = res.obj;
            this.guarderManage.seen = true;
          }
        }).catch(err => {
          // 异常情况
        });

      },
      deleteGuarderMember: function(id) {
        for (var i = 0; i < this.guarderManage.chooseData.length; i++) {
          if (id === this.guarderManage.chooseData[i].id) {
            this.guarderManage.chooseData.splice(i, 1);
            var node = this.$refs.tree.getNode(id);
            node.checked = false;
          }
        }
      },
      handleGuarderCheckChange: function(data, checked, indeterminate) {
        console.log(data, checked, indeterminate);
        if (data.type === 2 && checked) {
          var nodeObj = {};
          nodeObj.id = data.id;
          if (data.name.length > 5) {
            nodeObj.name = data.name.substring(0, 5) + '...';
          } else {
            nodeObj.name = data.name;
          }
          var length = false;
          for (var i = 0; i < this.guarderManage.chooseData.length; i++) {
            var id = this.guarderManage.chooseData[i].id;
            if (data.id === this.guarderManage.chooseData[i].id) {
              length = true;
            }
          }
          if (!length) {
            this.guarderManage.chooseData.push(nodeObj);
          }
        } else if (data.type === 2 && !checked) {
          for (var i = 0; i < this.guarderManage.chooseData.length; i++) {
            if (data.id === this.guarderManage.chooseData[i].id) {
              this.guarderManage.chooseData.splice(i, 1);
            }
          }
        }
        for (var i = 0; i < this.guarderManage.chooseData.length; i++) {
          var node = this.$refs.tree.getNode(this.guarderManage.chooseData[i].id);
          if (node.checked === false) {
            node.checked = true;
          }
        }
      },
      loadGuarderChildren(node, resolve) {
        if (node.data) {
          if (node.data.type === 2) {
            var childNodes = [];
            return resolve(childNodes);
          } else {
            this.getGuarderChild(node.data.id, node.data.type, resolve);
          }
        } else {
          setTimeout(() => {
            this.getGuarderChild(this.FleetId, 0, resolve);
          }, 0);
        }
      },
      getGuarderChild(id, type, resolve) {
        console.info('getGuarderChild');
        var jsonData = {
          parentId: id,
          type: type,
        };
        SubscriberManage.getFleetAndSub(jsonData).then(res => {
          if (res.success) {
            var childNodes = [];
            if (res.obj && res.obj.length > 0) {
              for (var i = 0; i < res.obj.length; i++) {
                if (res.obj[i].type === 2) {
                  res.obj[i].isLeaf = true;
                }
              }
              childNodes = res.obj;
            } else {
              var node = this.$refs.tree.getNode(id);
              node.loading = false;
              return;
            }
            resolve(childNodes);
          }
        }).catch(err => {
          // 异常情况
        });
        for (var i = 0; i < this.guarderManage.chooseData.length; i++) {
          var node = this.$refs.tree.getNode(this.guarderManage.chooseData[i].id);
          if (node.checked === false) {
            node.checked = true;
          }
        }
      },
      guarderModify() {

        for (var i = 0; i < this.guarderManage.chooseData.length; i++) {
          console.info('guarderManage ' + this.guarderManage.chooseData[i].name);
        }
        var jsonData = {
          relativeIds: this.guarderManage.chooseData,
          subId: this.guarderManage.subId,
        };
        var auditData = {
          dcId: this.$store.getters.userAccount,
          type: 5,
          status: '成功',
          describe: this.$store.getters.userName + '修改终端负责人:' + jsonData.subId,
          time: new Date,
          fleetId: this.$store.getters.scsFleetId,
          detailType: 26,
          remark: '',
        };
        SubscriberManage.modifyGuarder(jsonData).then(res => {
          if (res.success) {
            this.$message.success('操作成功');
            this.guarderManage.seen = false;
            this.GlobalFunc.GlaAddAudit(auditData);
          } else {
            auditData.status = '失败';
            this.GlobalFunc.GlaAddAudit(auditData);
          }
        }).catch(err => {
          // 异常情况
          auditData.status = '异常';
          this.GlobalFunc.GlaAddAudit(auditData);
        });

      },
      filterGuarderNode: function(value, data) {
        if (!value)
          return true;
        else
          return data.name.indexOf(value) !== -1;
      },

      changePageNum: function(val) {
        this.pageNum = val;
        this.query(this.pageNum);
      },
      changeSortPageNum(val) {
        this.sortPage.pageNum = val;
      },
      handleSelectionChange: function(val) {
        this.multipleSelection = val;
      },
      handelRowClick(val) {
        alert(val);
      },
      closeBox: function() {
        this.formClear();
        this.showBox = false;
        this.showImportBox = false;
        this.fileName = '';
      },
      batchExport: function() {
        var data = {
          multipleSelection: this.multipleSelection || '',
        };
        if (data.multipleSelection.length < 1) {
          this.$message('请选择需要导出的终端');
          return;
        }
        SubscriberManage.batchExport(data).then(res => {
          if (res.success) {
            // let nginxIp = this.$store.getters.stateBaseUrlHostname;
            let nginxIp = window.location.hostname;
            // let nginxIp = '192.168.0.209';
            var url = 'http://' + nginxIp + ':1604/upload/' + res.obj.url + '.xls';
            window.open(url, '_blank');
            this.multipleSelection = [];
            this.query(this.pageNum);
          } else {
            this.$message('导出失败');
          }

        }).catch(err => {
          // 异常情况
        });
      },
      batchImport: function() {
        this.formClear();
        this.showImportBox = true;
        this.title = '批量导入';
      },
      selectFile: function() {
        $('#selectFile').click();
        $('#selectFile').on('change', () => {
          var file = document.getElementById('selectFile').files[0];
          this.fileName = file.name;
        });
      },
      importSubscriber: function() {
        var data = {
          fleetId: this.form.fleetId,
          subType: this.form.subType,
        };
        if (this.form.fleetId === '') {
          this.$message.error('归属部门不能为空');
          return;
        }
        if (this.form.subType === '') {
          this.$message.error('终端类型不能为空');
          return;
        }
        // let basePath = this.$store.getters.stateBaseUrl +'/scs';
        let basePath = 'http://192.168.0.209:1603/scs';
        var file = document.getElementById('selectFile').files[0];
        if (file === '' || file == undefined) {
          this.$message.error('请选择文件');
          return;
        }
        var auditData = {
          dcId: this.$store.getters.userAccount,
          type: 5,
          status: '成功',
          describe: this.$store.getters.userName + '批量导入终端',
          time: new Date,
          fleetId: this.$store.getters.scsFleetId,
          detailType: 26,
          remark: '',
        };
        var formData = new FormData();
        formData.append('files', file);
        formData.append('fleetId', data.fleetId);
        formData.append('subType', data.subType);
        SubscriberManage.importSubscriber(formData).then(res => {
          if (res.success) {
            if (res.obj.count == 1) {
              this.GlobalFunc.GlaAddAudit(auditData);
              this.closeBox();
              this.$message.success('导入成功');
              this.query(this.pageNum);
              return true;
            } else if (res.obj.count == 2) {
              auditData.status = '失败';
              this.GlobalFunc.GlaAddAudit(auditData);
              this.closeBox();
              this.$message.error('号码为 ' + res.obj.subs + '的终端导入失败');
              this.query(this.pageNum);
              return true;
            }
          } else {
            auditData.status = '失败';
            this.GlobalFunc.GlaAddAudit(auditData);
            this.$message.error('导入失败');

          }
          this.fileName = '';

        }).catch(err => {

        });
      },
      uploadTemplate: function() {
        let nginxIp = this.$store.getters.stateBaseUrl;
        var url = nginxIp + '/scs/doc/subscriber_poc.xls';
        // var url= "http://192.168.0.201:1603/scs/doc/subscriber_poc.xls";
        window.open(url);
      },
    },
  };
</script>

<style scoped>
    /deep/ .el-checkbox__input > .el-checkbox__inner {
        display: none;
    }

    /deep/ .is-leaf + .el-checkbox .el-checkbox__inner {
        display: inline-block;
    }

    /deep/ .el-form-item__label {
        font-size: 22px !important;
    }

    /deep/ .el-input__inner {
        font-size: 22px !important;
    }

    /deep/ .el-tree-node {
        margin-top: 25px !important;
        height: auto;
    }


    /deep/ .el-tree-node__label {
        font-size: 25px;
    }

    /deep/ .el-select-dropdown__item {
        font-size: 20px;
    }

    /deep/ .el-dialog__title {
        font-size: 22px;
    }

    /deep/ .el-icon-close:before {
        font-size: 25px;
    }

    /deep/ .el-checkbox {
        height: 30px;
        width: 25px;
        z-index: 999;
    }

    /deep/ .el-table__header-wrapper /deep/ .el-checkbox /deep/ .el-checkbox__inner {
        height: 25px;
        width: 25px;
        z-index: 999;
    }

    /deep/ .el-table__header-wrapper /deep/ .el-checkbox /deep/ .el-checkbox__inner:before {
        font-size: 20px;
        margin: 12px auto auto 0px;
        text-align: center;
        line-height: 40px;
        z-index: 999;
    }/deep/ .el-table__header-wrapper /deep/ .el-checkbox /deep/ .el-checkbox__inner:after {
        height: 10px;
        width: 10px;
        font-size: 20px;
        margin: 2px auto auto 0px;
        text-align: center;
        line-height: 40px;
        z-index: 999;
    }

    /deep/ .el-table__row /deep/ .el-checkbox /deep/ .el-checkbox__inner {
        height: 22px;
        width: 25px;
        z-index: 999;
    }
    /deep/ .el-table__row /deep/ .el-checkbox /deep/ .el-checkbox__inner:after {
        height: 10px;
        width: 10px;
        font-size: 20px;
        margin: 10px auto auto 0px;
        text-align: center;
        line-height: 40px;
        z-index: 999;
    }

   /deep/ .el-icon-caret-right:before {
        font-size: 40px!important;
    }

    /*分页修改开始*/
    .el-pagination /deep/ .el-pagination__total {
        font-size: 20px;
        line-height: 60px;
    }

    .el-pagination /deep/ button /deep/ .el-icon .el-icon .el-icon-arrow-left {
        font-size: 50px;
        height: 60px;
        width: 40px;
    }

    /deep/ .el-pager li {
        margin-top: 15px;
        height: 60px;
        width: 60px;
        line-height: 60px;
        font-size: 18px;
    }

    /deep/ .el-pagination.is-background .btn-prev, .el-pager li {
        height: 60px;
        width: 60px;
    }

    /deep/ .el-pagination.is-background .btn-next, .el-pager li {
        height: 60px;
        width: 60px;
    }

    /deep/ .el-pagination .btn-prev .el-icon {
        font-size: 40px;
    }

    /deep/ .el-pagination .btn-next .el-icon {
        font-size: 40px;
    }

    /*分页修改结束*/
    #subscriberManage.el-checkbox__input > .el-checkbox__inner {
        display: none;
    }

    #subscriberManage.is-leaf + .el-checkbox .el-checkbox__inner {
        display: inline-block;
    }

    .table-head {
        background-color: #EEF4FF;
        color: #333333;
        font-weight: normal;
        font-size: 18px;
        font-family: SourceHanSansCN;
        border: none;
        padding: 12px 15px;
        text-align: left !important;
    }

    .table-croll {
        display: table;
        padding: 0px;
        width: 100%;
    }

    .croll {
        display: table-row;
        list-style: none;
        height: 30px;
        width: 100%;
        border-top: 0px;
        font-size: 16px;
        color: #333333;
        cursor: move;
        margin-block-start: 0em;
        margin-block-end: 0em;
        margin-inline-start: 0px;
        margin-inline-end: 0px;
        padding-inline-start: 0px;
        line-height: 25px;
        text-align: left ! important;
    }

    .croll li {
        display: table-cell;
        float: left;
        width: 15%;
        text-indent: 2em;
        list-style-type: none;
        height: 25px;
        padding-left: 5px;
        overflow: hidden;
        white-space: nowrap;
        vertical-align: middle;
        text-overflow: ellipsis
    }

    .croll:nth-of-type(even) {
        background: #f0f3f6;
    }

    .table-wrap {

    }

    #subscriberManage .table-wrap {
        height: 750px !important;
    }

    @media screen and (max-width: 1920px) and (max-height: 1280px) {
        #subscriberManage .table-wrap {
            height: 900px !important;
        }
    }

    .tree_class {
        /*height: 6860px;*/
        /*border-right: 1px solid #57a3f3;*/
    }

    .tableOverF {
        height: 300px;
        overflow: auto;
    }

    .searchForm {
        font-size: 16px
    }

    .searchFormBtn {
        margin-left: 5px;
        display: inline-block;
    }

    .treeLableImg {
        height: 25px;
        width: 25px;
        margin-right: 10px;
        vertical-align: middle
    }

    .treeLableImg25 {
        height: 25px;
        width: 25px;
        margin-right: 10px;
        vertical-align: middle;
        cursor: pointer
    }

    .leftTreeClass {
        /*float: left;*/
        width: 19%;
        height: 600px;
        background: white;
        position: absolute;
    }

    /*优化start*/

    @media screen and (max-width: 1920px) and (max-height: 1280px) {
        .leftTreeClass {
            float: left;
            width: 19%;
            height: 1200px;
            background: #ffffff;
            position: absolute;
            border-right: 1px solid #EBEEF5;
        }
    }

    .sortTableClass {
        height: 600px;
        overflow-y: auto;
    }

    /*优化end*/
    .sortmapiconOne {
        height: 30px;
        width: 30px;
        display: inline-block;

    }

    .sortmapicoTwo {
        height: 40px;
        width: 40px;
        display: inline-block;
    }
</style>
